package com.iterator;

import com.iterator.iface.Aggregate;
import com.iterator.iface.Iterator;
import com.iterator.iface.impl.AggregateImpl;

public class Test {
    public static void main(String[] args) {
        Aggregate list = new AggregateImpl();
        list.add("秀儿");
        list.add("梳");
        list.add("中分");

        Iterator iterator = list.getIterator();
        while ( iterator.hasNext() )
            System.out.print( iterator.next().toString() );

        Object ob = iterator.first();
        System.out.println("\nFirst：" + ob.toString());

    }
}
